<template>
  <div class="hello">
    <myHeader title="公告">
    </myHeader>
    <div class="content_dls" v-for="(a,i) in con">
    	<dl>
    		<dt>{{a.user}}</dt>
    		<dd>
    			<h3>{{a.title}}<span>{{a.time}}</span></h3>
    			<h5>{{a.content}}</h5>
    		</dd>
    	</dl>
    </div>
    	<div class="kong">111</div>
            <myfoot></myfoot>
  </div>


</template>

<script>
import myfoot from "@/components/footer"
import myHeader from "@/components/headerTop"
import {getAd} from "@/API"

export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      con:[],
      kong:true
    }
  },
  methods:{
  	go(val){
  		this.$router.push(val)
  	}
  },
  mounted(){
    this.$store.commit("changeIshow",{data:true})
    getAd().then((response) => {
        this.$store.commit("changeIshow",{data:false})
				console.log(response.dataList)
				if(response.dataList!=null){
					this.kong=false
					this.con=response.dataList.reverse()
				}
			})
  },
  components:{
myHeader,myfoot
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

	.kong{
	width: 100%;
	height: 3.5rem;
}
.top{
	width: 100%;
	height: 3.5rem;
	line-height: 3.5rem;
	background: #ccc;
	text-align: center;
	position: fixed;
	top: 0;
}


.this_clor{
	color: red;
}
.content_dls{

}
.content_dls dl{
	width: 95%;
	height: 4rem;
	background: #ccc;
	margin-top: 0.5rem;

}
.content_dls dl dt{
	width: 2rem;
	height: 4rem;
	background: red;
	float: left;
	line-height: 4rem;
	text-align: center;
	font-size: 14px;
	margin-right: 1rem;
	overflow: hidden;
	text-overflow:ellipsis;
	white-space: nowrap;
}
.content_dls dl dd{
	height: 4rem;
	background: gold;

}
.content_dls dl dd h3{
	width: 100%;
	height: 2rem;
	line-height: 2rem;
	background: #42B983;
	font-size: 14px;
}
.content_dls dl dd h3 span{
	font-size: 8px;
	color: #0000FF;
	float: right;
	margin-right: 0.5rem;

}
.content_dls dl dd h5{
	width: 100%;
	height: 2rem;
	line-height: 2rem;
	background: greenyellow;
	font-size: 8px;
}
</style>
